/*
 * Created on 25.09.2006 by leck
 *
 */
package de.devisnik.eidle.flashlight;

public abstract class AbstractShape implements IShape {

    protected void translate(int[] pointsCopy, int centerX, int centerY) {
        for (int i = 0; i < pointsCopy.length; i+=2) {
            pointsCopy[i] += centerX;
            pointsCopy[i+1] += centerY;
        }
    }

    protected int[] clonePoints(int[] points) {
        int[] pointsCopy = new int[points.length];
        System.arraycopy(points, 0, pointsCopy, 0, points.length);
        return pointsCopy;
    }

}